+2008-08-04 Michael Natterer <mitch@imendio.com>
+
+ * gtk/gtkclist.c
+ * gtk/gtkctree.c
+ * gtk/gtkpixmap.c
+ * gtk/gtkpreview.c: get rid of using deprecated GDK APIs.
+
+ * gtk/gtktext.c: ditto, apart from the text cruft APIs.
+
2008-08-04 Michael Natterer <mitch@imendio.com>
* gdk/gdk.c (gdk_parse_args): call gdk_rgb_set_verbose(TRUE) if
#include <stdlib.h>
#include <string.h>
-#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#define __GTK_CLIST_C__
switch (clist_row->cell[column].type)
{
case GTK_CELL_PIXTEXT:
- gdk_window_get_size (GTK_CELL_PIXTEXT (clist_row->cell[column])->pixmap,
- &width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXTEXT (clist_row->cell[column])->pixmap,
+ &width, &height);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
case GTK_CELL_PIXMAP:
- gdk_window_get_size (GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap,
- &width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap,
+ &width, &height);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
clist_row->foreground = *color;
clist_row->fg_set = TRUE;
if (GTK_WIDGET_REALIZED (clist))
- gdk_color_alloc (gtk_widget_get_colormap (GTK_WIDGET (clist)),
- &clist_row->foreground);
+ gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (clist)),
+ &clist_row->foreground, FALSE, TRUE);
}
else
clist_row->fg_set = FALSE;
clist_row->background = *color;
clist_row->bg_set = TRUE;
if (GTK_WIDGET_REALIZED (clist))
- gdk_color_alloc (gtk_widget_get_colormap (GTK_WIDGET (clist)),
- &clist_row->background);
+ gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (clist)),
+ &clist_row->background, FALSE, TRUE);
}
else
clist_row->bg_set = FALSE;
gdk_window_set_background (clist->clist_window,
&widget->style->base[GTK_STATE_NORMAL]);
gdk_window_show (clist->clist_window);
- gdk_window_get_size (clist->clist_window, &clist->clist_window_width,
- &clist->clist_window_height);
+ gdk_drawable_get_size (clist->clist_window, &clist->clist_window_width,
+ &clist->clist_window_height);
/* create resize windows */
attributes.wclass = GDK_INPUT_ONLY;
colormap = gtk_widget_get_colormap (widget);
if (clist_row->fg_set)
- gdk_color_alloc (colormap, &clist_row->foreground);
+ gdk_colormap_alloc_color (colormap, &clist_row->foreground,
+ FALSE, TRUE);
if (clist_row->bg_set)
- gdk_color_alloc (colormap, &clist_row->background);
+ gdk_colormap_alloc_color (colormap, &clist_row->background,
+ FALSE, TRUE);
}
for (j = 0; j < clist->columns; j++)
}
}
- gdk_cursor_destroy (clist->cursor_drag);
- gdk_gc_destroy (clist->xor_gc);
- gdk_gc_destroy (clist->fg_gc);
- gdk_gc_destroy (clist->bg_gc);
+ gdk_cursor_unref (clist->cursor_drag);
+ g_object_unref (clist->xor_gc);
+ g_object_unref (clist->fg_gc);
+ g_object_unref (clist->bg_gc);
for (i = 0; i < clist->columns; i++)
{
if (y + height > clip_rectangle->y + clip_rectangle->height)
height = clip_rectangle->y + clip_rectangle->height - y;
- gdk_draw_pixmap (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
+ gdk_draw_drawable (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
gdk_gc_set_clip_origin (fg_gc, 0, 0);
if (mask)
gdk_gc_set_clip_mask (fg_gc, NULL);
switch (clist_row->cell[i].type)
{
case GTK_CELL_PIXMAP:
- gdk_window_get_size (GTK_CELL_PIXMAP (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXMAP (clist_row->cell[i])->pixmap,
+ &pixmap_width, &height);
width += pixmap_width;
break;
case GTK_CELL_PIXTEXT:
- gdk_window_get_size (GTK_CELL_PIXTEXT (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXTEXT (clist_row->cell[i])->pixmap,
+ &pixmap_width, &height);
width += pixmap_width + GTK_CELL_PIXTEXT (clist_row->cell[i])->spacing;
break;
default:
#include "config.h"
#include <stdlib.h>
-#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#define __GTK_CTREE_C__
colormap = gtk_widget_get_colormap (GTK_WIDGET (ctree));
if (GTK_CTREE_ROW (node)->row.fg_set)
- gdk_color_alloc (colormap, &(GTK_CTREE_ROW (node)->row.foreground));
+ gdk_colormap_alloc_color (colormap,
+ &(GTK_CTREE_ROW (node)->row.foreground),
+ FALSE, TRUE);
if (GTK_CTREE_ROW (node)->row.bg_set)
- gdk_color_alloc (colormap, &(GTK_CTREE_ROW (node)->row.background));
+ gdk_colormap_alloc_color (colormap,
+ &(GTK_CTREE_ROW (node)->row.background),
+ FALSE, TRUE);
}
for (i = 0; i < clist->columns; i++)
}
}
- gdk_gc_destroy (ctree->lines_gc);
+ g_object_unref (ctree->lines_gc);
}
static gint
height = clip_rectangle->y + clip_rectangle->height - y;
if (width > 0 && height > 0)
- gdk_draw_pixmap (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
+ gdk_draw_drawable (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
if (mask)
{
switch (clist_row->cell[i].type)
{
case GTK_CELL_PIXMAP:
- gdk_window_get_size
+ gdk_drawable_get_size
(GTK_CELL_PIXMAP (clist_row->cell[i])->pixmap, &pixmap_width,
&height);
width += pixmap_width;
case GTK_CELL_PIXTEXT:
if (GTK_CELL_PIXTEXT (clist_row->cell[i])->pixmap)
{
- gdk_window_get_size
+ gdk_drawable_get_size
(GTK_CELL_PIXTEXT (clist_row->cell[i])->pixmap,
&pixmap_width, &height);
width += pixmap_width;
if (GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
{
- gdk_pixmap_unref
+ g_object_unref
(GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
if (GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
{
- gdk_pixmap_unref
+ g_object_unref
(GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
GTK_CELL_PIXTEXT
{
GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- gdk_pixmap_ref (GTK_CTREE_ROW (node)->pixmap_opened);
+ g_object_ref (GTK_CTREE_ROW (node)->pixmap_opened);
if (GTK_CTREE_ROW (node)->mask_opened)
GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- gdk_pixmap_ref (GTK_CTREE_ROW (node)->mask_opened);
+ g_object_ref (GTK_CTREE_ROW (node)->mask_opened);
}
if (GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
{
- gdk_pixmap_unref
+ g_object_unref
(GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
if (GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
{
- gdk_pixmap_unref
+ g_object_unref
(GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
GTK_CELL_PIXTEXT
{
GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- gdk_pixmap_ref (GTK_CTREE_ROW (node)->pixmap_closed);
+ g_object_ref (GTK_CTREE_ROW (node)->pixmap_closed);
if (GTK_CTREE_ROW (node)->mask_closed)
GTK_CELL_PIXTEXT
(GTK_CTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- gdk_pixmap_ref (GTK_CTREE_ROW (node)->mask_closed);
+ g_object_ref (GTK_CTREE_ROW (node)->mask_closed);
}
work = GTK_CTREE_ROW (node)->children;
case GTK_CELL_PIXTEXT:
if (GTK_CELL_PIXTEXT (clist_row->cell[column])->pixmap)
{
- gdk_window_get_size (GTK_CELL_PIXTEXT
- (clist_row->cell[column])->pixmap,
- &width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXTEXT
+ (clist_row->cell[column])->pixmap,
+ &width, &height);
width += GTK_CELL_PIXTEXT (clist_row->cell[column])->spacing;
}
else
}
break;
case GTK_CELL_PIXMAP:
- gdk_window_get_size (GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap,
- &width, &height);
+ gdk_drawable_get_size (GTK_CELL_PIXMAP (clist_row->cell[column])->pixmap,
+ &width, &height);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
g_free (old_text);
if (old_pixmap)
- gdk_pixmap_unref (old_pixmap);
+ g_object_unref (old_pixmap);
if (old_mask)
- gdk_pixmap_unref (old_mask);
+ g_object_unref (old_mask);
}
static void
{
if (GTK_CTREE_ROW (node)->pixmap_opened)
{
- gdk_pixmap_unref (GTK_CTREE_ROW (node)->pixmap_opened);
+ g_object_unref (GTK_CTREE_ROW (node)->pixmap_opened);
if (GTK_CTREE_ROW (node)->mask_opened)
- gdk_bitmap_unref (GTK_CTREE_ROW (node)->mask_opened);
+ g_object_unref (GTK_CTREE_ROW (node)->mask_opened);
}
if (GTK_CTREE_ROW (node)->pixmap_closed)
{
- gdk_pixmap_unref (GTK_CTREE_ROW (node)->pixmap_closed);
+ g_object_unref (GTK_CTREE_ROW (node)->pixmap_closed);
if (GTK_CTREE_ROW (node)->mask_closed)
- gdk_bitmap_unref (GTK_CTREE_ROW (node)->mask_closed);
+ g_object_unref (GTK_CTREE_ROW (node)->mask_closed);
}
GTK_CTREE_ROW (node)->pixmap_opened = NULL;
if (pixmap_closed)
{
- GTK_CTREE_ROW (node)->pixmap_closed = gdk_pixmap_ref (pixmap_closed);
+ GTK_CTREE_ROW (node)->pixmap_closed = g_object_ref (pixmap_closed);
if (mask_closed)
- GTK_CTREE_ROW (node)->mask_closed = gdk_bitmap_ref (mask_closed);
+ GTK_CTREE_ROW (node)->mask_closed = g_object_ref (mask_closed);
}
if (pixmap_opened)
{
- GTK_CTREE_ROW (node)->pixmap_opened = gdk_pixmap_ref (pixmap_opened);
+ GTK_CTREE_ROW (node)->pixmap_opened = g_object_ref (pixmap_opened);
if (mask_opened)
- GTK_CTREE_ROW (node)->mask_opened = gdk_bitmap_ref (mask_opened);
+ GTK_CTREE_ROW (node)->mask_opened = g_object_ref (mask_opened);
}
GTK_CTREE_ROW (node)->is_leaf = is_leaf;
if (ctree_row->pixmap_closed)
{
- gdk_pixmap_unref (ctree_row->pixmap_closed);
+ g_object_unref (ctree_row->pixmap_closed);
if (ctree_row->mask_closed)
- gdk_bitmap_unref (ctree_row->mask_closed);
+ g_object_unref (ctree_row->mask_closed);
}
if (ctree_row->pixmap_opened)
{
- gdk_pixmap_unref (ctree_row->pixmap_opened);
+ g_object_unref (ctree_row->pixmap_opened);
if (ctree_row->mask_opened)
- gdk_bitmap_unref (ctree_row->mask_opened);
+ g_object_unref (ctree_row->mask_opened);
}
if (ctree_row->row.destroy)
if (column < 0 || column >= GTK_CLIST (ctree)->columns)
return;
- gdk_pixmap_ref (pixmap);
+ g_object_ref (pixmap);
if (mask)
- gdk_pixmap_ref (mask);
+ g_object_ref (mask);
clist = GTK_CLIST (ctree);
if (pixmap)
{
- gdk_pixmap_ref (pixmap);
+ g_object_ref (pixmap);
if (mask)
- gdk_pixmap_ref (mask);
+ g_object_ref (mask);
}
GTK_CLIST_GET_CLASS (clist)->set_cell_contents
GTK_CTREE_ROW (node)->row.foreground = *color;
GTK_CTREE_ROW (node)->row.fg_set = TRUE;
if (GTK_WIDGET_REALIZED (ctree))
- gdk_color_alloc (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
- >K_CTREE_ROW (node)->row.foreground);
+ gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
+ >K_CTREE_ROW (node)->row.foreground,
+ FALSE, TRUE);
}
else
GTK_CTREE_ROW (node)->row.fg_set = FALSE;
GTK_CTREE_ROW (node)->row.background = *color;
GTK_CTREE_ROW (node)->row.bg_set = TRUE;
if (GTK_WIDGET_REALIZED (ctree))
- gdk_color_alloc (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
- >K_CTREE_ROW (node)->row.background);
+ gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET (ctree)),
+ >K_CTREE_ROW (node)->row.background,
+ FALSE, TRUE);
}
else
GTK_CTREE_ROW (node)->row.bg_set = FALSE;
#include "config.h"
#include <math.h>
-#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#define __GTK_PIXMAP_C__
oldwidth = GTK_WIDGET (pixmap)->requisition.width;
oldheight = GTK_WIDGET (pixmap)->requisition.height;
if (pixmap->pixmap)
- gdk_pixmap_unref (pixmap->pixmap);
+ g_object_unref (pixmap->pixmap);
if (pixmap->pixmap_insensitive)
- gdk_pixmap_unref (pixmap->pixmap_insensitive);
+ g_object_unref (pixmap->pixmap_insensitive);
pixmap->pixmap = val;
pixmap->pixmap_insensitive = NULL;
if (pixmap->pixmap)
{
- gdk_pixmap_ref (pixmap->pixmap);
- gdk_window_get_size (pixmap->pixmap, &width, &height);
+ g_object_ref (pixmap->pixmap);
+ gdk_drawable_get_size (pixmap->pixmap, &width, &height);
GTK_WIDGET (pixmap)->requisition.width =
width + GTK_MISC (pixmap)->xpad * 2;
GTK_WIDGET (pixmap)->requisition.height =
if (pixmap->mask != mask)
{
if (pixmap->mask)
- gdk_bitmap_unref (pixmap->mask);
+ g_object_unref (pixmap->mask);
pixmap->mask = mask;
if (pixmap->mask)
- gdk_bitmap_ref (pixmap->mask);
+ g_object_ref (pixmap->mask);
}
}
{
if (!pixmap->pixmap_insensitive)
build_insensitive_pixmap (pixmap);
- gdk_draw_pixmap (widget->window,
- widget->style->black_gc,
- pixmap->pixmap_insensitive,
- 0, 0, x, y, -1, -1);
+ gdk_draw_drawable (widget->window,
+ widget->style->black_gc,
+ pixmap->pixmap_insensitive,
+ 0, 0, x, y, -1, -1);
}
else
{
- gdk_draw_pixmap (widget->window,
- widget->style->black_gc,
- pixmap->pixmap,
- 0, 0, x, y, -1, -1);
+ gdk_draw_drawable (widget->window,
+ widget->style->black_gc,
+ pixmap->pixmap,
+ 0, 0, x, y, -1, -1);
}
if (pixmap->mask)
GdkPixbuf *pixbuf;
GdkPixbuf *stated;
- gdk_window_get_size (pixmap, &w, &h);
+ gdk_drawable_get_size (pixmap, &w, &h);
pixbuf = gdk_pixbuf_get_from_drawable (NULL,
pixmap,
gdk_pixbuf_saturate_and_pixelate (pixbuf, stated,
0.8, TRUE);
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
pixbuf = NULL;
insensitive = gdk_pixmap_new (GTK_WIDGET (gtkpixmap)->window, w, h, -1);
gtkpixmap->pixmap_insensitive = insensitive;
- g_object_unref (G_OBJECT (stated));
+ g_object_unref (stated);
}
#include "gtkaliasdef.c"
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
-#undef GDK_DISABLE_DEPRECATED
-#undef GTK_DISABLE_DEPRECATED
-
#include "config.h"
#include <math.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
+
+#undef GTK_DISABLE_DEPRECATED
+
#include "gtkpreview.h"
#include "gtkprivate.h"
#include "gtkintl.h"
klass->info.gamma = 1.0;
- gdk_rgb_init ();
-
g_object_class_install_property (gobject_class,
PROP_EXPAND,
g_param_spec_boolean ("expand",
if (GTK_WIDGET_DRAWABLE (widget))
{
preview = GTK_PREVIEW (widget);
-
- gdk_window_get_size (widget->window, &width, &height);
+
+ gdk_drawable_get_size (widget->window, &width, &height);
gtk_preview_put (GTK_PREVIEW (widget),
widget->window, widget->style->black_gc,
text->text_area = gdk_window_new (widget->window, &attributes, attributes_mask);
gdk_window_set_user_data (text->text_area, text);
- gdk_cursor_destroy (attributes.cursor); /* The X server will keep it around as long as necessary */
+ gdk_cursor_unref (attributes.cursor); /* The X server will keep it around as long as necessary */
widget->style = gtk_style_attach (widget->style, widget->window);
if (text->bg_gc)
{
- gdk_gc_destroy (text->bg_gc);
+ g_object_unref (text->bg_gc);
text->bg_gc = NULL;
}
gdk_window_destroy (text->text_area);
text->text_area = NULL;
- gdk_gc_destroy (text->gc);
+ g_object_unref (text->gc);
text->gc = NULL;
if (text->bg_gc)
{
- gdk_gc_destroy (text->bg_gc);
+ g_object_unref (text->bg_gc);
text->bg_gc = NULL;
}
- gdk_pixmap_unref (text->line_wrap_bitmap);
- gdk_pixmap_unref (text->line_arrow_bitmap);
+ g_object_unref (text->line_wrap_bitmap);
+ g_object_unref (text->line_arrow_bitmap);
unrealize_properties (text);
if (widget->style->bg_pixmap[GTK_STATE_NORMAL])
{
- gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
+ gdk_drawable_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
gdk_gc_set_ts_origin (text->bg_gc,
(- text->first_onscreen_hor_pixel + xthick) % width,
!(mask & (GDK_BUTTON1_MASK | GDK_BUTTON3_MASK)))
return FALSE;
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
if ((y < 0) || (y > height))
{
new_pixels = total_line_height (text, new_line, 1);
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
if (old_pixels != new_pixels)
{
if (!widget->style->bg_pixmap[GTK_STATE_NORMAL])
{
- gdk_draw_pixmap (text->text_area,
- text->gc,
- text->text_area,
- 0,
- pixel_height + old_pixels,
- 0,
- pixel_height + new_pixels,
- width,
- height);
+ gdk_draw_drawable (text->text_area,
+ text->gc,
+ text->text_area,
+ 0,
+ pixel_height + old_pixels,
+ 0,
+ pixel_height + new_pixels,
+ width,
+ height);
}
text->vadj->upper += new_pixels;
text->vadj->upper -= old_pixels;
new_pixels = total_line_height (text, new_lines, new_line_count);
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
if (old_pixels != new_pixels)
{
if (!widget->style->bg_pixmap[GTK_STATE_NORMAL])
{
- gdk_draw_pixmap (text->text_area,
- text->gc,
- text->text_area,
- 0,
- pixel_height + old_pixels,
- 0,
- pixel_height + new_pixels,
- width,
- height + (old_pixels - new_pixels) - pixel_height);
+ gdk_draw_drawable (text->text_area,
+ text->gc,
+ text->text_area,
+ 0,
+ pixel_height + old_pixels,
+ 0,
+ pixel_height + new_pixels,
+ width,
+ height + (old_pixels - new_pixels) - pixel_height);
}
text->vadj->upper += new_pixels;
scroll_int (text, - LINE_HEIGHT(CACHE_DATA(text->line_start_cache->next)));
}
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
for (cache = text->line_start_cache; cache; cache = cache->next)
{
{
gint height;
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
adj->step_increment = MIN (adj->upper, SCROLL_PIXELS);
adj->page_increment = MIN (adj->upper, height - KEY_SCROLL_PIXELS);
text->vadj->upper = data.pixel_height;
orig_value = (gint) text->vadj->value;
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
text->vadj->step_increment = MIN (text->vadj->upper, SCROLL_PIXELS);
text->vadj->page_increment = MIN (text->vadj->upper, height - KEY_SCROLL_PIXELS);
GList *cache = text->line_start_cache;
gint height;
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
for (; cache->next; cache = cache->next)
if (pixel_height_of(text, cache->next) > height)
real_diff += 1;
}
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
if (height > real_diff)
- gdk_draw_pixmap (text->text_area,
- text->gc,
- text->text_area,
- 0,
- real_diff,
- 0,
- 0,
- width,
- height - real_diff);
+ gdk_draw_drawable (text->text_area,
+ text->gc,
+ text->text_area,
+ 0,
+ real_diff,
+ 0,
+ 0,
+ width,
+ height - real_diff);
rect.x = 0;
rect.y = MAX (0, height - real_diff);
real_diff += 1;
}
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
if (height > real_diff)
- gdk_draw_pixmap (text->text_area,
- text->gc,
- text->text_area,
- 0,
- 0,
- 0,
- real_diff,
- width,
- height - real_diff);
+ gdk_draw_drawable (text->text_area,
+ text->gc,
+ text->text_area,
+ 0,
+ 0,
+ 0,
+ real_diff,
+ width,
+ height - real_diff);
rect.x = 0;
rect.y = 0;
text->cursor_pos_y += real_diff;
cursor_max = drawn_cursor_max(text);
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
if (cursor_max >= height)
find_mouse_cursor (text, text->cursor_pos_x,
gint ch_width;
GdkFont *font;
- gdk_window_get_size (text->text_area, (gint*) &max_display_pixels, NULL);
+ gdk_drawable_get_size (text->text_area, (gint*) &max_display_pixels, NULL);
max_display_pixels -= LINE_WRAP_ROOM;
lp.wraps = 0;
len = 1;
- gdk_window_get_size (text->text_area, &pixels_remaining, NULL);
+ gdk_drawable_get_size (text->text_area, &pixels_remaining, NULL);
pixels_remaining -= (LINE_WRAP_ROOM + running_offset);
space_width = MARK_CURRENT_TEXT_FONT(text, &mark)->char_widths[' '];
bitmap_height = line_arrow_height;
}
- gdk_window_get_size (text->text_area, &width, NULL);
+ gdk_drawable_get_size (text->text_area, &width, NULL);
width -= LINE_WRAP_ROOM;
gdk_gc_set_stipple (text->gc,
{
gint width, height;
- gdk_window_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
+ gdk_drawable_get_size (widget->style->bg_pixmap[GTK_STATE_NORMAL], &width, &height);
gdk_gc_set_ts_origin (text->bg_gc,
(- text->first_onscreen_hor_pixel) % width,
gint max_y = MAX (0, area->y + area->height);
gint height;
- gdk_window_get_size (text->text_area, NULL, &height);
+ gdk_drawable_get_size (text->text_area, NULL, &height);
max_y = MIN (max_y, height);
TDEBUG (("in expose x=%d y=%d w=%d h=%d\n", area->x, area->y, area->width, area->height));
if (end_pos < start_pos)
return;
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
area.x = 0;
area.y = -1;
area.width = width;
GTK_TEXT_INDEX (text, mark.index - 1) != LINE_DELIM)
decrement_mark (&mark);
- gdk_window_get_size (text->text_area, &width, &height);
+ gdk_drawable_get_size (text->text_area, &width, &height);
/* Fetch an entire line, to make sure that we get all the text
* we backed over above, in addition to enough text to fill up